#include <cstdlib>
#include <stdio.h>
#include <iostream>la
#include<queue>
using namespace std;

template <typename T>
class A
{
public:
    template <typename T2>
    void sort_ascend(T2 * a,int len)
    {
    	T2 c;
    	for ( int i =0; i < len-1; i++)
		{
			for(int j=i+1;j<len;j++)
			{
				if(a[j]<a[i])
				{
					c=a[i];
					a[i]=a[j];
					a[j]=c;		
				}
			}
		}
	}
};
int main()
{
    A<int> a;
    int b[5]={3,6,2,1,4};
    double c[5]={3.1,1.2,4.5,1.1,0.2};
    a.sort_ascend(b,5);
    a.sort_ascend(c,5);
    for(int i=0;i<5;i++) cout << b[i];
    cout << "\n";
    for(int i=0;i<5;i++) cout << c[i] << " ";
    return 0;
}
